package com.zsx.mapper;

import com.zsx.entity.Teacher;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface DoTeacher {
    @Select("select * from teacher where id=#{id}")
    Teacher selectTeacherById(int id);
    @Select("select * from teacher")
    List<Teacher> selectAllTeacher();
    @Delete("delete from teacher where id =#{id}")
    void deleteTeacherById(int id);
    @Update("update teacher  set id=#{id},name=#{name},course=#{course}")
    void updateTeacherById();
    @Insert("insert into teacher values (#{name},#{age},#{address}")
    void insertTeacher();

}
